package com.amin.app.web.service;

import com.amin.app.web.entity.SRole;
import com.amin.app.web.mapper.RoleMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleService {
    final
    RoleMapper roleMapper;

    public RoleService(RoleMapper roleMapper) {
        this.roleMapper = roleMapper;
    }


    public List<SRole> getRoleList(SRole sRole) {
        return roleMapper.getRoleList(sRole);
    }

    public void save(SRole sRole) {
        roleMapper.save(sRole);
    }

    public void delById(Integer id) {
        roleMapper.delById(id);
    }

    public SRole getRoleById(Integer id) {
        return roleMapper.getRoleById(id);
    }

    public void update(SRole sRole) {
        roleMapper.update(sRole);
    }
}
